#ifndef _OLED_H
#define _OLED_H

#include <stddef.h>
#include <stdint.h>

#define OLED_I2C_BAUDRATE 400*1000

#define OLED_I2C_ADDR    0x78

#define Max_Column	128

#define OLED_CMD    0x00    //向OLED写命令
#define OLED_DATA   0x40    //向OLED写数据

#define EIGHT       8

#define SIZEGAP           18

void Write_Byte_to_OLED(uint8_t Data, uint8_t Cmd_or_Data);
void oled_init(void);
//OLED最常用功能
void OLED_Show_Char(uint8_t x, uint8_t y, uint8_t size, uint8_t character);
void OLED_Show_String(uint8_t x, uint8_t y, uint8_t size, uint8_t *chr);
void OLED_Show_Chinese(uint8_t x, uint8_t y, uint8_t no);
void OLED_Show_Num(uint8_t x, uint8_t y, uint32_t num, uint8_t len);
void OLED_Show_picture(uint8_t x,uint8_t y, uint8_t size, uint8_t picture_num);
//OLED常用功能
void OLED_Display_Off(void);      //关屏
void OLED_Display_On(void);       //开屏
void OLED_Set_Pos(uint8_t x, uint8_t y);    //设置光标
void OLED_Test_All(void);         //全亮，测试每一个灯
void OLED_Clear_Line(uint8_t line);    //清除某一行
void oled_clear_line(uint8_t line0, uint8_t line1, uint8_t x0,  uint8_t x1);//清除某几行的某个位置
void OLED_Clear_All(void);        //清除屏幕所有内容

void oled_scroll_dispaly(uint8_t roll_direction, uint8_t start_page, uint8_t end_page);


#endif

